package com.leo.springbootmultithreadbasic.synchronizedkey.notsafe;

/**
 * @author Leo
 * @version V1.0
 */
public class MyThread extends Thread {

    private MyService myService;

    private String threadName;

    public MyThread(String threadName, MyService myService) {
        this.threadName = threadName;
        this.myService = myService;
    }

    @Override
    public void run() {
        myService.setNum(threadName);
    }
}
